package com.vinfai.patterns.strategy;

public class Client {
	
	public static void main(String[] args){
		
		Discount discount = new BookDiscount();
		Context ctx = new Context(discount);
		double dis = ctx.getPrice(100d);
		System.out.println(dis);
		ctx.changeDiscount(new VedioDiscount());
		System.out.println(ctx.getPrice(100d));
		
		Foo f = null;
		new Client().doFoo(f);
		System.out.println(f==null);
	}
	
	
	
	public void doFoo(Foo f){
//		f = new Foo();
		System.out.println(f.toString());
		f.i = 100;
	}
	
	
}

class Foo{
	int i = 0;
}